/* ==============================================================================
 * 创 建 者：yqd
 * 创建日期：2017-11-02	
 * 功能描述：邮件详情（接收）

 * 修 改 人:
 * 修改时间:
 * 修改描述：
 * ===========================================================
 */
//会员信息获取
var getMemberViewUrl = baseUrl + 'MemberF/MemberView';
var GetMsgDetailUrl = baseUrl + 'NoticeF/GetMsgDetail';

var oid = getURLParameter("oid");
var vu ;
$(function(){
	initVue();
})

function initVue(){
	vu = new Vue({
	    el: '#content',
	    data: {
	    	member : '',
			ToUserName : '',
			Title : '',
			Body : '',
			CreateTime:''
	    },
	    mounted:function(){
	    	this.GetMsgDetail();
	    	this.getMemberView();
	    },
	    methods: {
	    	getMemberView : getMemberView,
	        GetMsgDetail: function () {
	            common.get(GetMsgDetailUrl, {oid : oid }, 'json', function (r) {
	//             console.log(r)
	               if (r.ErrorCode == 0) {
	                   vu.ToUserName = r.Data.MsgDetail.ToUserName;
	                   vu.Title = r.Data.MsgDetail.Title;
	                   vu.Body = r.Data.MsgDetail.Body;
	                   vu.CreateTime = r.Data.MsgDetail.CreateTime;
	                } else {
	                    mui.toast(r.ErrorMsg);
	                }
	            })
	        }
	    }
	})
}

function getMemberView(){
	common.get(getMemberViewUrl,{},'json',function(r){
		if(r.ErrorCode==0){
			vu.member = r.Data.member;
		}else{
			mui.toast(r.ErrorMsg);
		}
	})
}

